/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.swt.mto.thithu.model;

import com.liferay.portal.model.ModelWrapper;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link Answer}.
 * </p>
 *
 * @author    tuan.nguyen
 * @see       Answer
 * @generated
 */
public class AnswerWrapper implements Answer, ModelWrapper<Answer> {
	public AnswerWrapper(Answer answer) {
		_answer = answer;
	}

	public Class<?> getModelClass() {
		return Answer.class;
	}

	public String getModelClassName() {
		return Answer.class.getName();
	}

	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("answerId", getAnswerId());
		attributes.put("questionId", getQuestionId());
		attributes.put("createUserId", getCreateUserId());
		attributes.put("modifyUserId", getModifyUserId());
		attributes.put("decription", getDecription());
		attributes.put("answerType", getAnswerType());
		attributes.put("correct", getCorrect());
		attributes.put("answerPosition", getAnswerPosition());
		attributes.put("createDate", getCreateDate());
		attributes.put("modifydate", getModifydate());

		return attributes;
	}

	public void setModelAttributes(Map<String, Object> attributes) {
		Long answerId = (Long)attributes.get("answerId");

		if (answerId != null) {
			setAnswerId(answerId);
		}

		Long questionId = (Long)attributes.get("questionId");

		if (questionId != null) {
			setQuestionId(questionId);
		}

		Long createUserId = (Long)attributes.get("createUserId");

		if (createUserId != null) {
			setCreateUserId(createUserId);
		}

		Long modifyUserId = (Long)attributes.get("modifyUserId");

		if (modifyUserId != null) {
			setModifyUserId(modifyUserId);
		}

		String decription = (String)attributes.get("decription");

		if (decription != null) {
			setDecription(decription);
		}

		Integer answerType = (Integer)attributes.get("answerType");

		if (answerType != null) {
			setAnswerType(answerType);
		}

		String correct = (String)attributes.get("correct");

		if (correct != null) {
			setCorrect(correct);
		}

		Integer answerPosition = (Integer)attributes.get("answerPosition");

		if (answerPosition != null) {
			setAnswerPosition(answerPosition);
		}

		Date createDate = (Date)attributes.get("createDate");

		if (createDate != null) {
			setCreateDate(createDate);
		}

		Date modifydate = (Date)attributes.get("modifydate");

		if (modifydate != null) {
			setModifydate(modifydate);
		}
	}

	/**
	* Returns the primary key of this answer.
	*
	* @return the primary key of this answer
	*/
	public long getPrimaryKey() {
		return _answer.getPrimaryKey();
	}

	/**
	* Sets the primary key of this answer.
	*
	* @param primaryKey the primary key of this answer
	*/
	public void setPrimaryKey(long primaryKey) {
		_answer.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the answer ID of this answer.
	*
	* @return the answer ID of this answer
	*/
	public long getAnswerId() {
		return _answer.getAnswerId();
	}

	/**
	* Sets the answer ID of this answer.
	*
	* @param answerId the answer ID of this answer
	*/
	public void setAnswerId(long answerId) {
		_answer.setAnswerId(answerId);
	}

	/**
	* Returns the question ID of this answer.
	*
	* @return the question ID of this answer
	*/
	public long getQuestionId() {
		return _answer.getQuestionId();
	}

	/**
	* Sets the question ID of this answer.
	*
	* @param questionId the question ID of this answer
	*/
	public void setQuestionId(long questionId) {
		_answer.setQuestionId(questionId);
	}

	/**
	* Returns the create user ID of this answer.
	*
	* @return the create user ID of this answer
	*/
	public long getCreateUserId() {
		return _answer.getCreateUserId();
	}

	/**
	* Sets the create user ID of this answer.
	*
	* @param createUserId the create user ID of this answer
	*/
	public void setCreateUserId(long createUserId) {
		_answer.setCreateUserId(createUserId);
	}

	/**
	* Returns the create user uuid of this answer.
	*
	* @return the create user uuid of this answer
	* @throws SystemException if a system exception occurred
	*/
	public java.lang.String getCreateUserUuid()
		throws com.liferay.portal.kernel.exception.SystemException {
		return _answer.getCreateUserUuid();
	}

	/**
	* Sets the create user uuid of this answer.
	*
	* @param createUserUuid the create user uuid of this answer
	*/
	public void setCreateUserUuid(java.lang.String createUserUuid) {
		_answer.setCreateUserUuid(createUserUuid);
	}

	/**
	* Returns the modify user ID of this answer.
	*
	* @return the modify user ID of this answer
	*/
	public long getModifyUserId() {
		return _answer.getModifyUserId();
	}

	/**
	* Sets the modify user ID of this answer.
	*
	* @param modifyUserId the modify user ID of this answer
	*/
	public void setModifyUserId(long modifyUserId) {
		_answer.setModifyUserId(modifyUserId);
	}

	/**
	* Returns the modify user uuid of this answer.
	*
	* @return the modify user uuid of this answer
	* @throws SystemException if a system exception occurred
	*/
	public java.lang.String getModifyUserUuid()
		throws com.liferay.portal.kernel.exception.SystemException {
		return _answer.getModifyUserUuid();
	}

	/**
	* Sets the modify user uuid of this answer.
	*
	* @param modifyUserUuid the modify user uuid of this answer
	*/
	public void setModifyUserUuid(java.lang.String modifyUserUuid) {
		_answer.setModifyUserUuid(modifyUserUuid);
	}

	/**
	* Returns the decription of this answer.
	*
	* @return the decription of this answer
	*/
	public java.lang.String getDecription() {
		return _answer.getDecription();
	}

	/**
	* Sets the decription of this answer.
	*
	* @param decription the decription of this answer
	*/
	public void setDecription(java.lang.String decription) {
		_answer.setDecription(decription);
	}

	/**
	* Returns the answer type of this answer.
	*
	* @return the answer type of this answer
	*/
	public int getAnswerType() {
		return _answer.getAnswerType();
	}

	/**
	* Sets the answer type of this answer.
	*
	* @param answerType the answer type of this answer
	*/
	public void setAnswerType(int answerType) {
		_answer.setAnswerType(answerType);
	}

	/**
	* Returns the correct of this answer.
	*
	* @return the correct of this answer
	*/
	public java.lang.String getCorrect() {
		return _answer.getCorrect();
	}

	/**
	* Sets the correct of this answer.
	*
	* @param correct the correct of this answer
	*/
	public void setCorrect(java.lang.String correct) {
		_answer.setCorrect(correct);
	}

	/**
	* Returns the answer position of this answer.
	*
	* @return the answer position of this answer
	*/
	public int getAnswerPosition() {
		return _answer.getAnswerPosition();
	}

	/**
	* Sets the answer position of this answer.
	*
	* @param answerPosition the answer position of this answer
	*/
	public void setAnswerPosition(int answerPosition) {
		_answer.setAnswerPosition(answerPosition);
	}

	/**
	* Returns the create date of this answer.
	*
	* @return the create date of this answer
	*/
	public java.util.Date getCreateDate() {
		return _answer.getCreateDate();
	}

	/**
	* Sets the create date of this answer.
	*
	* @param createDate the create date of this answer
	*/
	public void setCreateDate(java.util.Date createDate) {
		_answer.setCreateDate(createDate);
	}

	/**
	* Returns the modifydate of this answer.
	*
	* @return the modifydate of this answer
	*/
	public java.util.Date getModifydate() {
		return _answer.getModifydate();
	}

	/**
	* Sets the modifydate of this answer.
	*
	* @param modifydate the modifydate of this answer
	*/
	public void setModifydate(java.util.Date modifydate) {
		_answer.setModifydate(modifydate);
	}

	public boolean isNew() {
		return _answer.isNew();
	}

	public void setNew(boolean n) {
		_answer.setNew(n);
	}

	public boolean isCachedModel() {
		return _answer.isCachedModel();
	}

	public void setCachedModel(boolean cachedModel) {
		_answer.setCachedModel(cachedModel);
	}

	public boolean isEscapedModel() {
		return _answer.isEscapedModel();
	}

	public java.io.Serializable getPrimaryKeyObj() {
		return _answer.getPrimaryKeyObj();
	}

	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_answer.setPrimaryKeyObj(primaryKeyObj);
	}

	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _answer.getExpandoBridge();
	}

	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_answer.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new AnswerWrapper((Answer)_answer.clone());
	}

	public int compareTo(com.swt.mto.thithu.model.Answer answer) {
		return _answer.compareTo(answer);
	}

	@Override
	public int hashCode() {
		return _answer.hashCode();
	}

	public com.liferay.portal.model.CacheModel<com.swt.mto.thithu.model.Answer> toCacheModel() {
		return _answer.toCacheModel();
	}

	public com.swt.mto.thithu.model.Answer toEscapedModel() {
		return new AnswerWrapper(_answer.toEscapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _answer.toString();
	}

	public java.lang.String toXmlString() {
		return _answer.toXmlString();
	}

	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_answer.persist();
	}

	/**
	 * @deprecated Renamed to {@link #getWrappedModel}
	 */
	public Answer getWrappedAnswer() {
		return _answer;
	}

	public Answer getWrappedModel() {
		return _answer;
	}

	public void resetOriginalValues() {
		_answer.resetOriginalValues();
	}

	private Answer _answer;
}